import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import installElementPlus from './plugins/element'
// 样式
import './styles/index.scss'
// 导入svgIocn
import istallIcons from '@/icons/index.js'
// 导入路由守卫
import './permission'
// 国际化
import i18n from '@/i18n/index'
// 全局属性
import installFilter from '@/filter/index'
// 指令
import installDirective from '@/directives/index'

// elementplus 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
installElementPlus(app)
istallIcons(app)
installDirective(app)
installFilter(app)
app.use(store).use(i18n).use(router).mount('#app')
